<template>
	<view class="passageway">
		<template v-for="(item,index) in list">
			<view class="list-item" @click="onSelect(index)">
				<view class="left">{{item}}</view>
				<uni-icons v-if="index == select" 
				type="checkbox-filled" size="24" 
				color="#FE903D"></uni-icons>
				<uni-icons v-else
				type="circle" size="24" color="#666666"
				></uni-icons>
			</view>
			<view class="line"></view>
		</template>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:["BNB","TRX","TRC"],
				select:0,
			};
		},
		onLoad(opt) {
			var type = opt.type;
			var that = this;
			this.list.forEach((item,index)=>{
				if(item == type){
					that.select = index
					return
				}
			})
		},
		methods:{
			onSelect(index){
				this.select = index
				var that = this;
				uni.$emit('waySuccsse',that.list[index])
				uni.navigateBack()
			}
		}
	}
</script>

<style >
/* 	page{
		background-color: #120925;
	} */
</style>
<style lang="less">
.passageway{
	
}
.list-item{
	padding: 10px 20px;
	display: flex;
	justify-content: space-between;
	border-bottom: 1px solid #DFDFDF;
	
	.right{
		width: 20px;
		height: 20px;
		border-radius: 50%;
		background-color: #FE903D;
		text-align:center;
	}
}
.line{
	
}
</style>
